package com.zkthink.ceres.applet.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zkthink.ceres.applet.product.domain.entity.AppletStoreProduct;
import com.zkthink.ceres.applet.product.domain.vo.MyServerOrProductVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**

@Author cmz
@Date 2024-05-07 9:53
*/
public interface AppletStoreProductMapper extends BaseMapper<AppletStoreProduct> {
    @Select("SELECT asp.id, ap.product_name `serverName`, ap.product_img img, asp.group_buy_price price FROM applet_store_product asp LEFT JOIN applet_product ap ON asp.product_id = ap.id where asp.is_delete !=1 and  asp.store_id = #{id}")
    List<MyServerOrProductVo> selectByStoreId(Long id);
}